# -*- coding: utf-8 -*-
from fastapi import APIRouter

from .clause_router import list_upload_clause, list_compare_history, upload_compare_clause, get_task_progress, \
    delete_clause_compare_history, compare_clause,compare_clause
from .standard_clause import list_standard_clause, list_standard_clause_name, \
    upload_standard_clause, delete_standard_clause_file, delete_standard_clause_text, \
    update_standard_clause_group, update_standard_clause

router = APIRouter()


# 标准条款
router.get("/clause/list_standard_clause", tags=["Clause"], summary="列出标准条款")(list_standard_clause)
router.get("/clause/list_standard_clause_name", tags=["Clause"], summary="列出clause_name")(list_standard_clause_name)
router.get("/clause/list_clause", tags=["Clause"], summary="列出用户上传的对比条款")(list_upload_clause)
router.get("/clause/list_compare_history", tags=["Clause"], summary="列出对比历史")(list_compare_history)

# 上传标准条款
router.post("/clause/upload_standard_clause", tags=["Clause"], summary="上传标准条款")(upload_standard_clause)
# 上传对比条款
router.post("/clause/upload_compare_clause", tags=["Clause"], summary="上传对比条款")(upload_compare_clause)
# 获取解析进度
router.get("/clause/get_task_progress", tags=["Clause"], summary="获取解析进度")(get_task_progress)

# 删除标准条款文件
router.post("/clause/delete_standard_file", tags=["Clause"], summary="删除标准条款文件的文件")(delete_standard_clause_file)
# 删除标准条款文件的内容
router.post("/clause/delete_standard_clause", tags=["Clause"], summary="删除标准条款文件的内容")(delete_standard_clause_text)
# 删除对比历史
router.post("/clause/delete_his_clause", tags=["Clause"], summary="删除对比历史")(delete_clause_compare_history)
# 更新标准用户组
router.post("/clause/update_standard_clause_group", tags=["Clause"], summary="更新标准用户组")(update_standard_clause_group)
# 更新条款对话
router.post("/clause/update_standard_clause", tags=["Clause"], summary="更新条款对话")(update_standard_clause)

router.post("/clause/compare_clause", tags=["Clause"], summary="对比标准条款和新条款")(compare_clause)
